import { HttpLink } from 'apollo-link-http'
import { InMemoryCache } from 'apollo-cache-inmemory'
 
 
// make sure to export default
export default (ctx) => {
  // compose your Links here for the current client
  const appLink = new HttpLink({ uri: 'http://keystone.test/graphql' })
  // here you can place your middleware. ctx has the context forwarded from Nuxt
  // return the an object with additional apollo-client options
  return {
    link: appLink,
    cache: new InMemoryCache(),
    dataIdFromObject: o => o.id
  }
}